package lab01;

import java.util.Scanner;

public class Test13 {
    public static void main(String[] args) {
       for(int n=1;n<1000;n++){
           int a=n/100;
           int b=(n-a*100)/10;
           int c=n-a*100-b*10;
           if(a*a*a+b*b*b+c*c*c==n){
               System.out.println(n);
           }
       }



    }
}
